//
//  LTNetTool.h
//  聆听FM
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess)(id result);
typedef void(^BlockOfFailure)(NSError *error);

typedef NS_ENUM(NSUInteger, LTResponseStyle) {
    LTJSON,
    LTDATA,
    LTXML,
};

typedef NS_ENUM(NSUInteger, LTRequestStyle) {
    LTBodyJSON,
    LTBodyString
};


@interface LTNetTool : NSObject

+ (void)GetNetWithURL:(NSString *)url
                 Body:(id)body
               Header:(NSDictionary *)headers
             Response:(LTResponseStyle)response
              Success:(BlockOfSuccess)success
              Failure:(BlockOfFailure)failure;

+ (void)PostNetWithURL:(NSString *)url
                  Body:(id)body
             BodyStyle:(LTRequestStyle)bodystyle
                Header:(NSDictionary *)headers
              Response:(LTResponseStyle)response
               Success:(BlockOfSuccess)success
               Failure:(BlockOfFailure)failure;

@end
